The present invention relates to a single-ring cache control method for setting areas for reading and writing, respectively, on a cache as required according to the circumstances of access and for storing read data and write data.
The cache memory of a disk drive has a function of storing data items which are highly likely to be accessed in response to a following read command. The cache memory has a second function of storing write data transferred from a host.
A disk drive is usually equipped with one cache memory which is used to realize the aforementioned two functions. To use the cache memory efficiently, it is necessary to use the two functions properly according to the requirement from the host side at all times.
A dual ring method is available as a cache control method for realizing the two functions. This dual ring method consists of setting an area dedicated for reading and an area dedicated for writing on the cache memory and writing read data and write data into the two dedicated areas, respectively. A single ring method is also available. This method consists of setting an area for reading and an area for writing on the cache memory as demands arise according to the circumstances of access and storing read data and write data.
A further method described in patent reference 1 (JP-A-2002-108704) is also available. In particular, a cache control method is implemented that is adapted for a pattern of processing requests in which read requests alternate with write requests such as copy processing. Where an instruction for realizing this pattern of processing requests is given from a host, the cache control method is switched to a method adapted for the pattern of processing requests.